Passed
Push — develop ( 9a1b4b...96b452 )
by Xaver
03:40
created

container.js ➔ render   A

Complexity

Conditions 1

Size

Total Lines 3
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 2
dl 0
loc 3
rs 10
c 0
b 0
f 0
cc 1
1
define([], function () {
2
  'use strict';
3
4
  return function (tag) {
5
    if (!tag) {
6
      tag = 'div';
7
    }
8
9
    var self = this;
10
    var container = document.createElement(tag);
11
12
    self.add = function add(d) {
13
      d.render(container);
14
    };
15
16
    self.render = function render(el) {
17
      el.appendChild(container);
18
    };
19
20
    return self;
21
  };
22
});
23